A buddy of mine approached me the other day about creating a visually appealing way of randomly displaying images from a large collection. He cited the example on the CG Hug homepage. It had been a long time since I got to do some programming problem solving like this, so I accepted the challenge. While there are still a few tweaks to be done (images don't always completely fill the allotted cell), I'm pretty dang happy with what has emerged. Click here if you want to give it a try. Every reload will give you a different mosaic pattern and different random assortment of pictures. Also feel free to tweak the parameters in the url for different sized grids. For the time being, I'm only pulling images from /stuff9 (my most recent year or so of posts), but it would be neat to expand it someday, maybe even integrate it into the header of the blog*. Anyway, kind of a neat little project. |
Thursday October 13 2011 | File under: coding, pics |
Toggle Comments (4) | comment? |
on Fri 14th Oct, 2011 06:49 am PDT Saxtor said: Woah woah woah! You can't type a title-text like that and not leave some context/detail... ************************ on Fri 14th Oct, 2011 08:21 am PDT Luke said: Lets see if wren put any limits in his code: http://blogduwren.com/dev/per/canvas.php?height=3000&width=5500&cols=150&rows=1000 ************************ on Sun 23rd Oct, 2011 09:17 pm PDT Amiel Martin said: Nice! I like your usage of Array.prototype.sort(fn) ************************ on Sun 23rd Oct, 2011 10:03 pm PDT Wren said: @Amiel: I'm pretty sure that's a dig, right? There's no protocoling anywhere near that code. The unnecessary <script> tags are due to hastily transferring a php array into a javascript one. Or maybe you were looking at some other code, in which case I will pretend I totally used the fancy way of doing things. ************************ |
<<One Seasons Work | FC 149 - No Money Down>> |